export default {
	t5: [
    {
        "t1": "123",
        "t2": "123",
        "t3": "123",
        "t4": "123",
        "t5": "12312",
        "t6": "3123123",
        "t7": "123123"
    },
    {
        "t1": "123",
        "t2": "123",
        "t3": "123",
        "t4": "123",
        "t5": "12312",
        "t6": "3123123",
        "t7": "123123"
    },
    {
        "t1": "123",
        "t2": "123",
        "t3": "123",
        "t4": "123",
        "t5": "12312",
        "t6": "3123123",
        "t7": "123123"
    },
    {
        "t1": "123",
        "t2": "123",
        "t3": "123",
        "t4": "123123 123123",
        "t5": "123",
        "t6": "1231231",
        "t7": "123123"
    },
    {
        "t1": "123",
        "t2": "12",
        "t3": "312",
        "t4": "3123123123",
        "t5": "123",
        "t6": "123123123",
        "t7": "123123"
    }
],
	t4: [],
	t3: [{
			"title": "回收",
			"content": "专业回收电子元器件，集成电路，手机IC，二三极管，电解电容，胆电容，，字库，晶振，我们高价回收手机配件，手机屏，液晶屏，液晶总成，手机喇叭，手机尾插，手机连接器，FLash系列闪存，内存，单片机，模块,显卡，网卡，芯片，家电IC、电脑IC、通讯IC、电源IC、数码IC、安防IC、军工IC,K9F系列、南北桥、手机IC、电脑周边IC、电视机IC、ATMEL/PIC系列单片机、SAA系列、XC系列、RT系列、TDA系列、TA系列，手机主控IC，内存卡、字库、蓝牙芯片,功放IC、电解电容、钽电容、贴片电容、晶振、变压器、LED发光管、继电器...电脑配件.手机配件）等一切电子料等",
			"name": "20972123546",
			"time": "2023-03-07T06:48:14.646Z",
			"like": 0,
			"image": [
				"/static/n1.jpg",
				"/static/n2.jpg",
				"/static/n3.jpg",
				"/static/n4.jpg",
			]
		},
		{
			"title": "招聘",
			"content": "地铁十号线十号线招安保员<br>女：18-38 165cm以上<br>男：18-38 175cm以上<br>底薪4600.加班费一小时16 公寓房两人房四人房 管吃管住 买五险<br>电话：13213434319",
			"name": "20972123546",
			"time": "2023-03-07T06:48:07.212Z",
			"like": 0,
			"image": [
				"/static/n2.jpg",
				"/static/n1.jpg",
				"/static/n3.jpg",
				"/static/n4.jpg",
			]
		},
		{
			"title": "理性爱国",
			"content": "理性爱国首先是合法爱国，而不是违法爱国。理性爱国是指在日本右翼势力抛出购岛言论后，激起各地进行反日游行活动后，一些不法分子冒充爱国青年混杂在游行、抗议队伍中进行打砸抢等活动。",
			"name": "20972123546",
			"time": "2023-03-07T06:48:07.212Z",
			"like": 0,
			"image": [
				"/static/n3.jpg",
				"/static/n2.jpg",
				"/static/n1.jpg",
				"/static/n4.jpg",
			]
		},
		{
			"title": "学习",
			"content": "努力学习，为国家的建设贡献力量",
			"name": "20972123546",
			"time": "2023-03-07T06:48:07.212Z",
			"like": 0,
			"image": [
				"/static/n4.jpg",
				"/static/n2.jpg",
				"/static/n3.jpg",
				"/static/n1.jpg",
			]
		}
	],
	toService(name) {
		switch (name) {
			case "寄快递":
				uni.navigateTo({
					url: "/pages/smart/t6/t6"
				})
				break
			case "车辆管理":
				uni.navigateTo({
					url: "/pages/smart/t5/t5"
				})
				break
			case "商业推广":
				uni.navigateTo({
					url: "/pages/smart/t4/t4"
				})
				break
			case "友邻社交":
				uni.navigateTo({
					url: "/pages/smart/t3/t3"
				})
				break
			case "快件管理":
				uni.navigateTo({
					url: "/pages/smart/t2/t2"
				})
				break
			case "物业服务":
				uni.navigateTo({
					url: "/pages/smart/t1/t1"
				})
				break
			case "找工作":
				uni.navigateTo({
					url: "/pages/service/job/job"
				})
				break
			case "找房子":
				uni.navigateTo({
					url: "/pages/service/house/house"
				})
				break
			case "城市地铁":
				uni.navigateTo({
					url: "/pages/service/subway/subway"
				})
				break
			case "更多服务":
				uni.switchTab({
					url: "/pages/service/service"
				})
				break
			default:
				uni.navigateTo({
					url: '/pages/service/other/other?name=' + name,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
		}
	},
	isEmpty(obj) {
		if (Object.values(obj).filter(e => {
				return e === null || e === '' || e === undefined
			}).length > 0) {
			uni.showToast({
				title: '请填写完整',
				icon: 'none'
			});
			throw new Error('请填写完整')
		}
	},
	get(url, data, is) {
		return new Promise((succ, fail) => {
			if (is) {
				uni.showLoading({
					title: '努力加载中',
					mask: true
				});
			}
			uni.request({
				url: uni.getStorageSync("baseUrl") + url,
				method: 'GET',
				data: data,
				header: {
					"Authorization": uni.getStorageSync("token")
				},
				success: res => {
					let data = res.data
					if (data.code == 401) {
						uni.showToast({
							title: '登录已过期',
							icon: 'none'
						});
						setTimeout(function() {
							uni.reLaunch({
								url: "/pages/index/index"
							})
						}, 500);
					}
					succ(data)
				},
				fail: (e) => {
					console.log(e);
					uni.showToast({
						title: '网络错误',
						icon: 'none'
					});
				},
				complete: () => {
					uni.hideLoading()
				}
			});
		})
	},
	post(url, data, is) {
		return new Promise((succ, fail) => {
			uni.showLoading({
				title: '正在提交',
				mask: true
			});
			uni.request({
				url: uni.getStorageSync("baseUrl") + url,
				method: 'POST',
				data: data,
				header: {
					"Authorization": uni.getStorageSync("token")
				},
				success: res => {
					let data = res.data
					if (data.code == 401) {
						uni.showToast({
							title: '登录已过期',
							icon: 'none'
						});
						setTimeout(function() {
							uni.reLaunch({
								url: "/pages/index/index"
							})
						}, 500);
					}
					succ(data)
				},
				fail: (e) => {
					console.log(e);
					uni.showToast({
						title: '网络错误',
						icon: 'none'
					});
				},
				complete: () => {
					uni.hideLoading()
				}
			});
		})
	},
	put(url, data, is) {
		return new Promise((succ, fail) => {
			uni.showLoading({
				title: '正在提交',
				mask: true
			});
			uni.request({
				url: uni.getStorageSync("baseUrl") + url,
				method: 'PUT',
				data: data,
				header: {
					"Authorization": uni.getStorageSync("token")
				},
				success: res => {
					let data = res.data
					if (data.code == 401) {
						uni.showToast({
							title: '登录已过期',
							icon: 'none'
						});
						setTimeout(function() {
							uni.reLaunch({
								url: "/pages/index/index"
							})
						}, 500);
					}
					succ(data)
				},
				fail: (e) => {
					console.log(e);
					uni.showToast({
						title: '网络错误',
						icon: 'none'
					});
				},
				complete: () => {
					uni.hideLoading()
				}
			});
		})
	}
}
